package cn.xuchunh.campusbbs.ui.fragments;


import android.support.v4.view.PagerAdapter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import cn.xuchunh.campusbbs.R;
import cn.xuchunh.campusbbs.adapter.HomePageAdapter;
import cn.xuchunh.campusbbs.base.BaseFragment;

public class HomePageFragment extends TabFragment {

    public HomePageFragment() {
    }

    @Override
    protected PagerAdapter createAdapter() {
        List<BaseFragment> fragmentList = new ArrayList<>();
        fragmentList.add(TopicListFragment.getInstance(TopicListFragment.TYPE_NEW, 0, 1, 1, "typeid"));
        fragmentList.add(TopicListFragment.getInstance(TopicListFragment.TYPE_MARROW, 0, 0, 0, "typeid"));
        List<String> titleList = Arrays.asList(getResources().getStringArray(R.array.homepage_forum_title));
        return new HomePageAdapter(getChildFragmentManager(), fragmentList, titleList);
    }

}
